package peer.rudp;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.util.HashMap;
public class UDPOutputStream extends OutputStream{
	ConnectionUDP conn;
	DatagramSocket2 ds2;
	InetAddress dstIp;
	int dstPort;
	Sender sender;
	byte[] data=new byte[1024];
	HashMap sendTable;
	UDPOutputStream (ConnectionUDP conn){
		this.conn=conn;
		this.ds2=conn.ds2;
		this.dstIp=conn.dstIp;
		this.dstPort=conn.dstPort;
		this.sender=conn.sender;
	}
	public void write(short tunnelId,byte[] data,int offset,int length) throws ConnectException {
		sender.sendData(tunnelId,data, offset,length);
	}
	
	@Override
	public void write(int arg0) throws IOException {
		
	}
	

}
